package com.tuanzi.loan.web.lazy.xhh.settlementsystem;

import com.tuanzi.loan.business.service.xhh.settlementsystem.XhhSettlementPrepayService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.xhh.settlementsystem.XhhSettlementPrepayRequest;
import com.tuanzi.loan.vo.response.xhh.settlementsystem.XhhSettlementPrepayResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-08-20 14:07
 */
public class XhhSettlementPrepayLazyDataModel extends BaseLazyDataModel<XhhSettlementPrepayRequest, XhhSettlementPrepayResponse> {
    private XhhSettlementPrepayService xhhSettlementPrepayService = SpringContextHolder.getBean(XhhSettlementPrepayService.class);
    public XhhSettlementPrepayLazyDataModel(XhhSettlementPrepayRequest settlementPrepayRequest) {
        super(settlementPrepayRequest);
    }
    @Override
    protected Page<XhhSettlementPrepayResponse> doLoad(PageSearcher<XhhSettlementPrepayRequest> pageSearcher) {
        return xhhSettlementPrepayService.list(pageSearcher);
    }
}